<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml"> 
<head> 
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 
<title>高级查询</title> 
<link href="/Public/ui/css/main.css" rel="stylesheet" type="text/css" /> 
<script type="text/javascript" src="/dadaocms/Public/ui/js/jquery-1.8.0.min.js"></script>
<script type="text/javascript" src="/dadaocms/Public/ui/js/jquery.easyui.min.js"></script>
<script type="text/javascript" src="/dadaocms/Public/ui/js/jquery.form.js"></script>
<style type="text/css">html,body {overflow-y:scroll}</style> 
<script type="text/javascript">
		$(function(){
			/*$('#form1').ajaxForm({
				beforeSubmit: checkForm ,
				success:	complete ,
				dataType:	'json'
			});*/
		     function checkForm(){
            	if( '' == $.trim($('#title').val())){
	                $('#result').html('标题不能为空').show();
	                return false;
            	}
            	}
           
           function complete(data){
            if (data.status==1){
                $('#result').html(data.info).show();
                // 更新列表
                data = data.data;
                //var html =  ' <ul id="d3"> <li class="w300" title="">'+data.title+' </li> <li><a href="javascript:editdoctor('+data.id+')">编辑</a> | <a href="javascript:edit('+data.id+')">删除</a></li> </ul> ' ;
                var html =  ' <ul id="d3"> <li class="w300" title="">'+data.title+' </li> </ul> ' ;
                $('#dep').append(html);
            }else{
                $('#result').html(data.info).show();
            }
        }
		});
		
		$(function(){
			$('#form2').ajaxForm({
				success: editok ,
				dataType: 'json'
			});
			function editok(data){
				if (data.status == 1){
					//alert("修改成功");
					window.location.reload();
				}else{
					alert(data.info);
				}
			}
		});
	  function checkTitle(){
           		$.post('/visit/Entity/checkTitle',{'title':$('#title').val()},function(data){
			            if (data.status ==1) {
			           $('#result').html(data.info).show();
			           //alert('数据重复');
           			 }
        			},'json'); 
    } 
      function editdoctor(id){
      		$('#adddiv').hide();
           		$.post('/visit/Entity/loadedit',{'id':id},function(data){
			            if (data.status ==1) {
			          		$('#editdiv').show();
			          		$('#id').val(data.data.id);
			          		$('#title2').val(data.data.title);
			          		//alert(data.data.title);
			           
           			 }else{
           			 	 $('#result').html(data.info).show();
           			 }
        			},'json'); 
    } 
      function deletedoctor(id){
      		if (confirm("你确定要删除吗？") == true ){
      		
      		$.post('/visit/Entity/delete',{'id':id},function(data){
			            if (data.status ==1) {
			           //$('#result').html(data.info).show();
			            //alert('成功删除数据');
			            window.location.reload(); 
           			 }else{
           			 	alert('删除失败');
           			 }
        			},'json'); 
        	}else{
        		return false;
        	}
      }
$(function(){
	var doctoradvice = $('#doctoradvice').val();
	$('#doctoradvice').click(function(){
		if($(this).val()==doctoradvice){
			$('#doctoradvice').val('');								  
		}
	});	  
});      
</script>
</head> 

<body>
<div style="height:15px"></div>
  <table width="98%" border="0" align="center" cellpadding="0" cellspacing="0" id="head1" >
    <tr>
      <td colspan="2">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr>
            <td width="84" height="24" align="center" background="/Public/ywt/itemnote1.gif">&nbsp;高级查询&nbsp;</td>
            <td width="84" align="center" background="/Public/ywt/itemnote2.gif"><a href="#" onClick="ShowItem2()"></a></td>
            <td width="200" align="center" background="/Public/ywt/itemnote2.gif" style="color:#F00"></td>
          </tr>
        </table>
      </td>
    </tr>
  </table>
  <table width="98%" border="0" align="center" cellpadding="0" cellspacing="0" id="head2" style="display:none">
    <tr>
      <td colspan="2"> <table height="24" border="0" cellpadding="0" cellspacing="0">
          <tr>
            <td width="84" align="center" background="/Public/ywt/itemnote2.gif"><a href="#" onClick="ShowItem1()"><u>常规信息</u></a>&nbsp;</td>
            <td width="84" align="center" background="/Public/ywt/itemnote1.gif">高级参数</td>
          </tr>
        </table></td>
    </tr>
  </table>
<form name="form1" id="form1" action="__URL__/index" enctype="multipart/form-data" method="post">
<input type="hidden" name="action" value="sousuo" />
  <table width="98%"  border="0" align="center" cellpadding="2" cellspacing="2" id="needset" style="border:1px solid #cfcfcf;background:#ffffff;">
    <tr>
      <td width="100%" height="24" class="bline"><table width="98%" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td width="4%" style="color:#F00">姓名：</td>
          <td width='10%'><input name="name" type="text" id="name" style="width:90px" value="" onclick="WdatePicker()" /></td>
          <td width="6%" style="color:#F00">年龄段：</td>
          <td width="18%"><input name="age1" type="text" id="age1" style="width:30px" value="" maxlength="2">
            - 
            <input name="age2" type="text" id="age2" style="width:30px;" maxlength="2" /></td>
          <td width="9%">科室：</td>
          <td width="12%">
          <select name="department" id="department">
          	<option value="" selected="selected">请选择科室</option>
            <volist name='department' id='vo'>
              <option value="{$vo.id}">{$vo.title}</option>
            </volist>
          </select>
          </td>
          <td width="8%">&nbsp;<span style="color:#F00">手术：</span></td>
          <td width="13%">
          <select name="isoperation" id="isoperation">
          	  <option value="" selected="selected">请选择手术</option>
            <volist name='isoperation' id='vo'>
              <option value="{$vo.id}">{$vo.title}</option>
            </volist>
          </select></td>
          <td width="9%">回访失败原因：</td>
          <td>
          <select name="visitfail" id="visitfail">
          		<option value="" selected="selected">请选择回访失败原因</option>
            <volist name='visitfail' id='vo'>
              <option value="{$vo.id}">{$vo.title}</option>
            </volist>
          </select></td>
        </tr>
      </table></td>
    </tr>
    <tr>
      <td width="100%" height="24" class="bline"><table width="98%" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td width="4%"><span style="color:#F00">电话：</span></td>
          <td width="10%" style="color:#F00"><input name="Telephone" type="text" id="Telephone" style="width:90px;" /></td>
          <td width="7%">初诊时间：</td>
          <td width="18%"><input name="actdate1" type="text" id="actdate1" style="width:80px" value="2012-12-12" maxlength="10" />
-
  <input name="actdate2" type="text" id="actdate2" style="width:80px;" maxlength="10" /></td>
          <td width="9%">回访员：</td>
          <td width="13%"><span style="color:#F00">
            <input name="vuser" type="text" id="vuser" style="width:100px;" />
          </span></td>
          <td width="7%"><span style="color:#F00">试孕：</span></td>
          <td width='13%'>
          <select name="trypregant" id="trypregant">
          		<option value="" selected="selected">请选择试孕时间</option>
            <volist name='ispregnant' id='vo'>
              <option value="{$vo.id}">{$vo.title}</option>
            </volist>
          </select></td>
          <td width='9%'>已经停止治疗：</td>
          <td>
         <select name="stoptreatment" id="stoptreatment">
          		<option value="" selected="selected">请选已经停止治疗时间</option>
            <volist name='stoptreatment' id='vo'>
              <option value="{$vo.id}">{$vo.title}</option>
            </volist>
          </select></td>
        </tr>
      </table></td>
    </tr>
    <tr>
      <td height="24" class="bline"><table width="98%" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td width="4%"><span style="color:#F00">地址：</span></td>
          <td width="10%" style="color:#F00"><input name="address" type="text" id="address" style="width:90px;" /></td>
          <td width="7%">复诊时间：</td>
          <td width="18%"><input name="retreatmentdate1" type="text" id="retreatmentdate1" style="width:80px" value="" maxlength="10" />
-
  <input name="retreatmentdate2" type="text" id="retreatmentdate2" style="width:80px;" maxlength="10" /></td>
          <td width="9%">患者满意程度：</td>
          <td width="13%">
          <select name="satisfaction" id="satisfaction">
          		<option value="" selected="selected">请选患者满意程度</option>
            <volist name='satisfaction' id='vo'>
              <option value="{$vo.id}">{$vo.title}</option>
            </volist>
          </select></td>
          <td width="7%"><span style="color:#F00">怀孕：</span></td>
          <td width='13%'>
          <select name="ispregnant" id="ispregnant">
          		<option value="" selected="selected">请选已经怀孕时间</option>
            <volist name='ispregnant' id='vo'>
              <option value="{$vo.id}">{$vo.title}</option>
            </volist>
          </select></td>
          <td width='9%'>已经外院治疗：</td>
          <td>
          <select name="otherhospital" id="otherhospital">
          	<option value="" selected="selected">请选外院治疗经历</option>
            <volist name='otherhospital' id='vo'>
              <option value="{$vo.id}">{$vo.title}</option>
            </volist>
          </select></td>
        </tr>
      </table></td>
    </tr>
	<tr>
      <td  height="24" class="bline"><table width="98%" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td width="4%">性别：</td>
          <td width='10%'>男：<input name="sex" type="radio" id="radio" value="1" /> 女：<input name="sex" type="radio" id="radio2" value="0" /></td>
         
          <td width="8%" style="color:#F00">回访时间：</td>
          <td width="18%"><span id='typeid2ct'></span>
            <input name="visitdate1" type="text" id="visitdate1" style="width:80px" value="" maxlength="10" />
-
<input name="visitdate2" type="text" id="actdate4" style="width:80px;" maxlength="10" /></td> <td width="9%">患者反映问题：</td>
            <td width="14%"><select name="problem" id="problem">
            	<option value="" selected="selected">请选患者反映的问题</option>
              <volist name='problem' id='vo'>
                <option value="{$vo.id}">{$vo.title}</option>
              </volist>
            </select></td>
            <td width="7%">跑单：</td>
            <td width="13%"><select name="skipper" id="skipper">
            		<option value="" selected="selected">请选患者跑单情况</option>
              <volist name='skipper' id='vo'>
                <option value="{$vo.id}">{$vo.title}</option>
              </volist>
            </select></td>
            <td width="7%">就诊卡号：</td>
            <td><input name="sickhid" type="text" id="sickhid" style="width:100px" value="" onclick="WdatePicker()" /></td>
        </tr>
      </table></td>
    </tr>
    <tr>
      <td>    </td>
    </tr>
  </table>
  <!-- //高级参数 -->
  

<table width="98%" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#F9FCEF" style="border:1px solid #cfcfcf;border-top:none;">
  <tr>
    <td height="35">
	<table width="100%" border="0" cellspacing="1" cellpadding="1">
        <tr>
          <td width="17%">&nbsp;</td>
          <td width="83%"><table width="214" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td width="115"><input name="imageField" type="image" src="/dadaocms/Public/ywt/button_ok.gif" width="60" height="22" class="np" border="0" style="cursor:pointer"></td>
                <td width="99">
                	<img src="/dadaocms/Public/ywt/button_reset.gif" width="60" height="22" border="0" onClick="location.reload();" style="cursor:pointer">
                </td>
              </tr>
            </table></td>
        </tr>
      </table></td>
  </tr>
</table>
</form>
</body> 
</html>